package zsc.ruanc.practicaltraining.service;

public interface RedisService {

    public void set(String key, Object value);

    public void set(String key, Object value, int time);

    public Object get(String key);

    public boolean delete(String key);

    /**
     * 延长某个缓存的时间
     * @param key
     * @param time
     * @return
     */
    public boolean refresh(String key, int time);

    /**
     * 验证二维码的正确性
     * @param key
     * @return
     */
    public boolean verificationCode(String key, int code);

}
